<template>
  <div class="service-container">
    <div class="title-container">
      <div class="title-left">
        <div class="title">服务推荐</div>
        <AsideNumber :data="asideData" />
      </div>
      <More />
    </div>
    <div class="content">
      <div class="icon-container">
        <EntryIcon
          class="icon"
          :img="item.img"
          :text="item.text"
          v-for="(item, i) in iconData"
          :key="i"
          :active="i === activeIndex"
          :textStyle="{
            fontSize: '13px',
            fontWeight: 'normal',
          }"
          :imgWidth="32"
        />
      </div>
      <div class="item-container">
        <ServiceItem v-for="(item, i) in itemData" :key="i" :data="item" />
      </div>
    </div>
  </div>
</template>

<script>
import AsideNumber from "./AsideNumber.vue";
import More from "./More.vue";
import EntryIcon from "./EntryIcon.vue";
import ServiceItem from "./ServiceItem.vue";
import Hot from "@/assets/data/exports/热门@3x.png";
import Basic from "@/assets/data/exports/layer@3x.png";
import Platform from "@/assets/data/exports/平台@3x.png";
import App from "@/assets/data/exports/应用@3x.png";
import AI from "@/assets/data/exports/硬件@3x.png";
import Public from "@/assets/data/exports/公共@3x.png";
import Rate from "@/assets/data/exports/评估@3x.png";
export default {
  components: {
    AsideNumber,
    More,
    EntryIcon,
    ServiceItem,
  },
  data() {
    return {
      activeIndex: 0,
      asideData: [
        {
          text: "上云服务",
          number: 58,
        },
        {
          text: "服务商",
          number: 20,
        },
      ],
      iconData: [
        {
          img: Hot,
          text: "热门服务",
        },
        {
          img: Basic,
          text: "基础服务",
        },
        {
          img: Platform,
          text: "平台服务",
        },
        {
          img: App,
          text: "应用服务",
        },
        {
          img: AI,
          text: "智能硬件",
        },
        {
          img: Public,
          text: "公共服务",
        },
        {
          img: Rate,
          text: "评估服务",
        },
      ],
      itemData: [
        {
            title: "科泰只能云·道路运输车辆卫士",
            detail: "面向交通运输行业卫星定位，视频监控。",
            company: "四川科泰智能电子有限公司"
        },
        {
            title: "PS Cloud-生产制造套餐",
            detail: "PS Cloud提供了商城、CRM、生产制造、质量管理、采购管理、销售管理、库存管理等应用",
            company: "浪潮云信息技术有限公司"
        },
        {
            title: "云硬盘",
            detail: "为云主机提供高可靠、高性能、规格丰富并且可弹性扩展的块存储服务",
            company: "中国电信股份有限公司成都分公司"
        },
        {
            title: "企业级销售工业电商平台",
            detail: "网络销售及供应链下游业务协同及内部协同平台建设",
            company: "益企云科技股份有限公司"
        },
      ],
    };
  },
};
</script>

<style lang="scss" scoped>
.service-container {
  .title-container {
    height: 25px;
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    .title-left {
      height: 100%;
      display: flex;
      align-items: center;
      .title {
        font-size: 22px;
        font-weight: bold;
        display: inline-block;
        margin-right: 20px;
      }
    }
  }
  .content {
    .icon-container {
      display: flex;
      justify-content: space-between;
      border-bottom: 1px solid #ededed;
      margin-bottom: 15px;
      cursor: pointer;
    }
    .item-container {
      display: grid;
      grid-template-columns: repeat(2, 1fr);
      gap: 20px;
    }
  }
}
</style>
